-- GENERATED SPELL FOR [Grand Commander Ruusk] --


function spell0_20563(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20563', 5332, 1)
end

function spell1_20563(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_20563', 687, 1)
end

function spell2_20563(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37704,pUnit)
pUnit:RegisterEvent('Sorts_20563', 2000, 1)
end

function Sorts_20563(pUnit, Event)
local choix_sorts_20563 = math.random(0, 2)
if choix_sorts_20563 == 0 then
pUnit:RegisterEvent('spell0_20563', 1, 1)
end
if choix_sorts_20563 == 1 then
pUnit:RegisterEvent('spell1_20563', 1, 1)
end
if choix_sorts_20563 == 2 then
pUnit:RegisterEvent('spell2_20563', 1, 1)
end
end

function mob20563_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20563', math.random(1500, 3000), 1)
end

function mob20563_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20563_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20563_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20563, 1, 'mob20563_Action')
RegisterUnitEvent(20563, 2, 'mob20563_Leave')
RegisterUnitEvent(20563, 3, 'mob20563_Kill')
RegisterUnitEvent(20563, 4, 'mob20563_Die')
